package abstractfactory;

import abstractfactory.creator.CNPizzaStore;
import abstractfactory.creator.NYPizzaStore;
import abstractfactory.product.abstracts.Pizza;

/**
 * @ClassName: test
 * @Description:
 * @Date: 2021/1/13 14:34
 * @Author: Song JinGen
 */
public class test {
    public static void main(String[] args) {
        CNPizzaStore cnPizzaStore = new CNPizzaStore();
        Pizza pizza = cnPizzaStore.orderPizza(1);
        System.out.println(pizza.getName()+",购买成功");

        System.out.println("-----------------------------");
        NYPizzaStore nyPizzaStore = new NYPizzaStore();
        Pizza pizza1 = nyPizzaStore.orderPizza(2);
        System.out.println(pizza1.getName()+",购买成功");
    }
}
